<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <%@ include file="/include/service-base-header.jsp" %>
    <title>标签管理</title>
    <style>
        .table tbody tr td, .table th {
            padding: 5px;
        }
    </style>
</head>
<body>
<div class="wrapper">
    <jsp:include page="/include/left_menu.jsp">
        <jsp:param name="index" value="0"/>
    </jsp:include>
    <div class="main-panel">

        <nav class="navbar navbar-expand-lg navigation_shadow_none">
            <div class="container-fluid">
                <div class="navbar-wrapper b-navbar-wapper">
                    <a class="b-navbar-title" href="${pageContext.request.contextPath}/s/home.do">赛事管理</a>
                    <a class="b-navbar-title" href="${pageContext.request.contextPath}/s/event-manager.do">比赛管理</a>
                    <a class="b-navbar-title-active" href="#">标签管理</a>
                </div>
            </div>
        </nav>
        <div class="container-fluid">
            <div class="navbar navbar-expand-lg navbar-transparent">
                <div class="container-fluid">
                    <div class="navbar-wrapper">
                        <button type="button" class="btn btn-info" data-toggle="modal" data-target="#Add_Tab_Modal">新增标签
                        </button>
                    </div>
                </div>
            </div>
        </div>
        <%--弹框开始--%>
        <%--//新增标签--%>
        <div class="modal fade" id="Add_Tab_Modal" tabindex="-1" role="">
            <div class="modal-dialog modal-login" role="document">
                <div class="modal-content">
                    <div class="card card-signup card-plain">

                        <div class="modal-body">
                            <button type="button" class="close mt-4" data-dismiss="modal" aria-hidden="true"><i
                                    class="material-icons">clear</i></button>

                            <form class="form">
                                <span id="tab_id" style="display: none"></span>
                                <p class="description text-center mt-4">新增标签</p>
                                <div class="card-body">
                                    <div class="form-group bmd-form-group">
                                        <div class="input-group">
                                            <input id="tab_name" type="text" class="form-control"
                                                   placeholder="标签名称">
                                        </div>
                                    </div>
                                    <select id="tab_value" class="selectpicker form-group "
                                            data-style="select-with-transition" title="标签状态" data-size="7">
                                        <option value="-1" disabled>选择状态</option>
                                        <option value="0">赛事</option>
                                        <option value="1">比赛</option>
                                        <option value="2">国家</option>
                                    </select>
                                </div>
                            </form>
                        </div>
                        <div class="modal-footer justify-content-center">
                            <a onclick="add_tab()" class="btn btn-primary btn-link btn-wd btn-lg">保存</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <%--编辑标签--%>
        <div class="modal fade" id="Edit_Tab_Modal" tabindex="-1" role="">
            <div class="modal-dialog modal-login" role="document">
                <div class="modal-content">
                    <div class="card card-signup card-plain">

                        <div class="modal-body">
                            <button type="button" class="close mt-4" data-dismiss="modal" aria-hidden="true"><i
                                    class="material-icons">clear</i></button>

                            <form class="form">
                                <span id="edit_tab_id" style="display: none"></span>
                                <p class="description text-center mt-4">编辑标签</p>
                                <div class="card-body">
                                    <div class="form-group bmd-form-group">
                                        <div class="input-group">
                                            <input id="edit_tab_name" type="text" class="form-control"
                                                   placeholder="标签名称">
                                        </div>
                                    </div>
                                    <select id="edit_tab_value" class="selectpicker form-group "
                                            data-style="select-with-transition" title="标签状态" data-size="7">
                                        <option value="-1" disabled>选择状态</option>
                                        <option id="edit_tab_value_0" value="0">赛事</option>
                                        <option id="edit_tab_value_1" value="1">比赛</option>
                                        <option id="edit_tab_value_2" value="2">国家</option>
                                    </select>
                                </div>
                            </form>
                        </div>
                        <div class="modal-footer justify-content-center">
                            <a onclick="editTabActionSave()" class="btn btn-primary btn-link btn-wd btn-lg">保存</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <%--弹框结束--%>

        <div class="col-md-12">
            <div class="card card-plain">
                <div class="card-header card-header-primary">
                    <div class="card-title">标签列表</div>
                    <p class="card-category">查询，管理标签</p>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table">
                            <thead class="text-primary">
                            <th class="text-primary" style="width: 30%">
                                标签名称
                            </th>
                            <th class="text-primary" style="width: 30%">
                                类别
                            </th>
                            <th class="text-primary" style="width: 30%">
                                操作
                            </th>
                            </tr>
                            </thead>
                            <tbody id="tbody">

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>

</body>
<script src="${pageContext.request.contextPath}/js/tab-manager.js"></script>
</html>